package com.molichuxing.services.infrastructure.dao;


import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.molichuxing.framework.dao.RootMapper;
import com.molichuxing.services.infrastructure.bean.AdvertisingStoreBean;

public interface AdvertisingStoreMapper extends RootMapper<AdvertisingStoreBean> {

    /**
     * 根据门店id获取广告信息
     * @param storeId
     * @return
     */
	Integer getAdvertIdByStoreId(@Param("storeId")Integer storeId);

	 /**
	  * 根据广告id查询绑定门店数量
	  * @param advertId
	  * @return
	  */ 	
	Integer getStoreCountByAdvertId(@Param("advertId")Integer advertId);

	/**
	 * 根据广告id查询门店id
	 * @param advertId
	 * @return
	 */
	List<AdvertisingStoreBean> getAdvertisingStoreByAdvertId(@Param("advertId")Integer advertId);

	/**
	 * 删除绑定关系
	 * @param storeId
	 * @return
	 */
	Integer deleteByStoreId(@Param("storeId")Integer storeId);

	/**
	 * 删除绑定关系
	 * @param advertId
	 * @return
	 */
	Integer deleteByAdvertId(@Param("advertId")Integer advertId);
}